package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the BED_TABLE database table.
 * 
 */
@Entity
@Table(name="BED_TABLE")
@NamedQuery(name="BedTable.findAll", query="SELECT b FROM BedTable b")
public class BedTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private long bedid;

	private String bedname;

	private String bedstatus;

	//bi-directional many-to-one association to SickroomTable
	@ManyToOne
	@JoinColumn(name="SICKROOMID")
	private SickroomTable sickroomTable;

	//bi-directional many-to-one association to LiveinrecordTable
	@OneToMany(mappedBy="bedTable")
	private List<LiveinrecordTable> liveinrecordTables;

	public BedTable() {
	}

	public long getBedid() {
		return this.bedid;
	}

	public void setBedid(long bedid) {
		this.bedid = bedid;
	}

	public String getBedname() {
		return this.bedname;
	}

	public void setBedname(String bedname) {
		this.bedname = bedname;
	}

	public String getBedstatus() {
		return this.bedstatus;
	}

	public void setBedstatus(String bedstatus) {
		this.bedstatus = bedstatus;
	}

	public SickroomTable getSickroomTable() {
		return this.sickroomTable;
	}

	public void setSickroomTable(SickroomTable sickroomTable) {
		this.sickroomTable = sickroomTable;
	}

	public List<LiveinrecordTable> getLiveinrecordTables() {
		return this.liveinrecordTables;
	}

	public void setLiveinrecordTables(List<LiveinrecordTable> liveinrecordTables) {
		this.liveinrecordTables = liveinrecordTables;
	}

	public LiveinrecordTable addLiveinrecordTable(LiveinrecordTable liveinrecordTable) {
		getLiveinrecordTables().add(liveinrecordTable);
		liveinrecordTable.setBedTable(this);

		return liveinrecordTable;
	}

	public LiveinrecordTable removeLiveinrecordTable(LiveinrecordTable liveinrecordTable) {
		getLiveinrecordTables().remove(liveinrecordTable);
		liveinrecordTable.setBedTable(null);

		return liveinrecordTable;
	}

}